//
//  AboutViewController.m
//  远方
//
//  Created by 1564335 on 15-6-8.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "AboutViewController.h"

@interface AboutViewController ()

@end

@implementation AboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    UIImageView *backgroundImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, _WIDTH, _HEIGHT)];
    [self.view addSubview:backgroundImageView];
    UIBlurEffect *effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
    UIVisualEffectView *backgroundView = [[UIVisualEffectView alloc] initWithEffect:effect];
    backgroundView.frame = CGRectMake(0, 0, _WIDTH, _HEIGHT);
    [self.view addSubview:backgroundView];
    [backgroundImageView setImage:[UIImage imageNamed:@"bgImage2"]];
    
    self.view.backgroundColor = [UIColor colorWithRed:227/255.0 green:233/255.0 blue:240/255.0 alpha:1];
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(10, 20, 30, 30);
    [button setImage:[UIImage imageNamed:@"iconfont-fanhui"] forState:UIControlStateNormal];
    [self.view addSubview:button];
    [button addTarget:self action:@selector(getBack) forControlEvents:UIControlEventTouchUpInside];
    
    
    UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(10, 60, _WIDTH - 20, 40)];
    label1.text = @"纯   音";
    label1.textAlignment = NSTextAlignmentCenter;
    UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(10, 100, 200, 40)];
    label2.text = @"版本信息: 1.0";
    UILabel *label3 = [[UILabel alloc] initWithFrame:CGRectMake(10, 140, self.view.frame.size.width - 20, 40)];
    label3.text = @"‘纯音’是一款实用的音乐播放器，包含了当红歌手, 歌曲排行, 歌曲分类等，能够满足大家对于倾听音乐的不同需求。为热爱音乐的您提供优质音乐。纯音的成长离不开您的关注与支持，希望能够得到您的意见及建议。\n申明：本软件不涉及任何商业运营，如有侵权，请及时联系我。\n联系方式：yan_1564335@126.com\n开发者：胡岩";
    label3.font = [UIFont systemFontOfSize:20];
    label3.numberOfLines = 0;
    [label3 sizeToFit];

    [self.view addSubview:label1];
    [self.view addSubview:label2];
    [self.view addSubview:label3];
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init];
    paragraphStyle.lineSpacing = 8;
    NSDictionary *attributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:15], NSParagraphStyleAttributeName:paragraphStyle};
    label3.attributedText = [[NSAttributedString alloc]initWithString:label3.text attributes:attributes];
    
}

- (void)getBack
{
    [self dismissViewControllerAnimated:YES completion:^{
        [[CDSideBarController sharedInstance] dismissMenu];
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
